package com.xxyf.controller;


import com.xxyf.mapper.UsernameMapper;
import com.xxyf.pojo.Username;
import com.xxyf.pojo.Userplan;
import com.xxyf.service.PlanService;
import com.xxyf.service.UsernameService;
import com.xxyf.tools.Rest;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author 小小怡飞
 * @Date 2022/8/24 3:54
 * @Version JDK 8
 */
@RestController
@Api(tags = "添加管理组")
@RequestMapping("/plan")
public class Plan {
    @Autowired
    private PlanService plan;

    @GetMapping("/groups/{id}")
    private Rest groups(@PathVariable("id") Integer id){
        return plan.grouos(id);
    }

    @PutMapping("/add")
    private Rest add(@RequestBody Userplan userplan){
        return plan.add(userplan);
    }


}
